<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

// http://erp/create/3
//Route::post('create/:id','DeptController/create');

//路由分组，需要绑定绑定域名

// 公共管理
Route::group('common', function () {
    Route::get('getProvince', 'CommonController/getProvince');
    Route::get('getCity', 'CommonController/getCity');
    Route::get('getArea', 'CommonController/getArea');
});

// 产品管理
Route::group('product', function () {
    Route::get('find', 'ProductController/find');
    Route::get('list', 'ProductController/list');
    Route::post('add', 'ProductController/add');
    Route::put('edit', 'ProductController/edit');
    Route::delete('delete', 'ProductController/delete');
    Route::get('export', 'ProductController/export');
    Route::post('import', 'ProductController/import');
    Route::post('upload', 'ProductController/upload');
});

// 分类管理
Route::group('category', function () {
    Route::post('add', 'CategoryController/add');
    Route::get('get_cate_tree', 'CategoryController/tree');
    Route::get('list', 'CategoryController/list');
    Route::put('edit', 'CategoryController/edit');
    Route::delete('delete', 'CategoryController/delete');
});

// 分类管理
Route::group('supplier', function () {
    Route::post('add', 'SupplierController/add');
    Route::get('list', 'SupplierController/list');
    Route::put('edit', 'SupplierController/edit');
    Route::delete('delete', 'SupplierController/delete');
});
